<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
	String from  = request.getParameter("from");
%>


<script type="text/javascript">
<!--
if('server' == '<%=from%>'){
	if(parent.parent.window){
		parent.parent.window.location.href = "error.jsp";
	} else if(parent.window){
		parent.window.location.href = "error.jsp";
	} else {
		window.location.href = "error.jsp";
	}
}

//-->
</script>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>登录错误</title>
		<link type="text/css" rel="stylesheet" href="resource/css/style.css" />
	</head>
	<body>
		<br />
		<p align="center">这里是错误页面;</p>
		<br />
		<p align="center">
			系统将在&nbsp;<b><span style="color:red" id="time_span">3</span></b>&nbsp;秒钟后自动为您转向到登录页面。
		</p>
		<br />
		<p align="center"><a href="<%=path%>">点击这里登录</a></p>
	</body>
	<script type="text/javascript">
	var timer = setInterval('tm()',1000);
	function tm(){
		var sec = document.getElementById('time_span').innerHTML;
		sec = sec -1;
		document.getElementById('time_span').innerHTML = sec;
		if(sec<= 0){
			clearInterval(timer);
			if(parent.parent.window){
				parent.parent.window.location.href = "<%=path%>";
			} else if(parent.window){
				parent.window.location.href = "<%=path%>";
			} else {
				window.location.href = "<%=path%>";
			}
		}
	}
	</script>
</html>
